public class FooCorporation {

   public static void main(String[] args) {
        System.out.println("Employee 1 worked 35 hours, get paid $" + cal_salary(35, 7.5));
        System.out.println("Employee 2 worked 47 hours, get paid $" + cal_salary(47, 8.2));
        System.out.println("Employee 3 worked 73 hours, get paid $" + cal_salary(73, 10.0));
    }

    public static double cal_salary(double hours, double base_pay){
        double salary = 0.0;
        if(base_pay <= 8.0){
            System.out.println("base pay lower than $8.00/hour!");
        }
        if(hours>60){
            System.out.println("work hour greater than 60!");
        }
        if(hours <= 40){
            salary += hours*base_pay;
        }else{
            salary += 40*base_pay;
            salary += (hours-40) * 1.5 * base_pay;
        }
        return salary;

    }

}